<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.org/ui" xmlns:a4j="http://richfaces.org/a4j"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

				<p:growl id="messages" showDetail="true" />
				<p:fileUpload fileUploadListener="#{ResimlerBean.handleFileUpload}"
					mode="advanced" update=":urunislemForm:fileList" multiple="true"
					showButtons="false" sizeLimit="100000"
					allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />

				<p:contextMenu for="fileList">  
			        <p:menuitem value="Delete" update="fileList" 
			        	icon="ui-icon-close" action="#{ResimlerBean.deleteFileToList}"/>  
    			</p:contextMenu>
    			
				<p:dataTable id="fileList" var="resList" rowKey="#{resList.fileName}"  
                 selection="#{ResimlerBean.removeFile}" selectionMode="single"
					value="#{ResimlerBean.fileList}">
					<f:facet name="header">  
            			Uploaded Files  
        			</f:facet>

					<p:column id="modelHeader">
						<f:facet name="header">  
                    		File Name  
            			</f:facet>
						<h:outputText value="#{resList.fileName}" />
					</p:column>

					<p:column>
						<f:facet name="header">  
                    		Size 
           				 </f:facet>
						<h:outputText value="#{resList.size}" />
					</p:column>

					<p:column>
						<f:facet name="header">  
                    		Content Type  
            			</f:facet>
						<h:outputText value="#{resList.contentType}" />
					</p:column>

				</p:dataTable>

</ui:composition>